package com.study.d5_regex;


public class ReplaceSplit {
    public static void main(String[] args) {
        //代替
        String s = "古力娜扎fnasofjaosf56_5迪丽热巴sdsa6黄卓从";
        String s1 = s.replaceAll("\\w+", "-");
        System.out.println(s1);
        System.out.println("------------------------");
        //分割
        String[] split = s.split("\\w+");
        for (int i = 0; i < split.length; i++) {
            System.out.println(split[i]);
        }
    }
}
